package com.ouyang.Service.Impl;


import com.ouyang.Service.UpdatePwdService;
import com.ouyang.mapper.UpdatePwdMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UpdatePwdServiceImpl implements UpdatePwdService {

    @Autowired
    private UpdatePwdMapper updatePwdMapper;

    @Override
    public Integer update ( String username, String pwd ) {
        int flag = 0;
        try {
            flag = updatePwdMapper.update(username, pwd);
        } catch (Exception e) {
            e.printStackTrace();
        }
        if (flag == 1) {
            return 1;
        } else {
            return 0;
        }
    }
}
